package com.pkk.cloud.support.oauth2.client.authurl.api;

import com.pkk.cloud.support.admin.oauth2.api.common.req.ResourceUrlAuth;
import com.pkk.components.rpc.request.CommonRequest;
import com.pkk.components.rpc.response.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @description: 验权接口的feign
 * @author: peikunkun
 * @create: 2020-03-21 15:25
 **/
@FeignClient(value = AuthToAccessApi.AUTH_TO_ACCESS_API_NAME, fallback = AuthToAccessApiHystrix.class)
public interface AuthToAccessApi {

  //认证授权的服务
  public static final String AUTH_TO_ACCESS_API_NAME = "cloud-support-oauth2-center-runner";


  /**
   * @Description: 认证授权接口是否有权限
   * @return: com.pkk.components.rpc.response.CommonResponse<java.lang.Boolean>
   * <p>
   * userName:用户名称 reqUrl:接口地址
   * @Author: peikunkun
   * @Date: 2020/3/21 0021 下午 3:29
   */
  @RequestMapping(value = {"/api/userAuthentication"}, method = {RequestMethod.POST})
  CommonResponse<Boolean> userAuthentication(@RequestBody CommonRequest<ResourceUrlAuth> var1);
}
